#include <iostream>

using namespace std;
const int N = 110;

int t;
char a[N];

int main()
{
	cin >> t;
	while(t--)
	{
		int n; cin >> n;
		int cnt1 = 0, cnt2 = 0;
		for(int i = 1; i < n; i++)
		{
			cin >> a[i];
			if(a[i] == '<') cnt1++;
			else cnt2++;
		} 
		int be = n - cnt2;
		int mina = be, maxa = be;
		cout << be << " ";
		for(int i = 1; i < n; i++)
		{
			if(a[i] == '<') 
			{
				mina--;
				cout << mina << " ";
			
			}
			else 
			{
				maxa++;
				cout << maxa << " ";
			}
		}
	}
	return 0;
}
